package com.gbx.databinding;

import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.gbx.databinding.databinding.ActivityMainBinding;

public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
        User user = new User("gbx", "北京", "g@gmail.com", "10086");
        user.setIcon("http://avatar.csdn.net/A/E/9/1_shihongjian001.jpg");
        binding.setUser(user);


    }
}
